﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        // 事件绑定原始方式
        window.onload = function () {
            document.getElementById("btnTest").onclick = function () {
                alert("test1");
            };
            document.getElementById("btnTest").onclick = Test2;
        };

        function Test2() {
            alert("test2");
        }
    </script>
</head>
<body>
    <input id="btnTest" type="button" value="Test" />
</body>
</html>
